Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing selectExprNeedsAlias to consider string literal quotes #2710

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Oct 18, 2024

When fixing a string literal quoting issue in Doltgres (dolthub/doltgresql#868), table functions stopped working, because the selectExprNeedsAlias started returning true to indicate that an alias was needed (even though it wasn't) and the buildTableFunc function would fail.

This started happening because the quoted string literals no longer matched InputExpression, since InputExpression always trims off quotes when it is assigned. Another solution could be to expose the trimQuotes function from Vitess and use it to trim expr.String() before matching against InputExpression.

@fulghum fulghum marked this pull request as draft October 18, 2024 23:28
@fulghum fulghum marked this pull request as ready for review October 21, 2024 20:35
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fulghum fulghum merged commit c5725b1 into main Oct 22, 2024
8 checks passed
@fulghum fulghum deleted the fulghum/doltgres-fix branch October 22, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants